package gee

import (
	"log"
	"time"
)

func LoggerHandler() HandlerFunc {

	return func(c *Context) {
		start := time.Now()
		c.Next()
		cost := time.Since(start)
		log.Printf("handled uri - %s | status:%d; cost: %s\n", c.Req.URL.RequestURI(), c.Status, cost.String())
	}
}
